package com.ada.spark.datasource

import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession

object TextTest {

    def main(args: Array[String]): Unit = {
        //创建配置对象
        val conf: SparkConf = new SparkConf().setAppName("TextTest").setMaster("local[*]")

        //创建SparkSql的环境对象
        val spark: SparkSession = SparkSession.builder().config(conf).getOrCreate();

        val df = spark.read.textFile("format/people.txt")

        df.show()
    }
}
